import React, { FC } from 'react';
import { Upload, Icon } from 'choerodon-ui';
import UploadImg from '../assets/tupian@2x.png';
import styles from '../style.less';

const UploadItem: FC<{}> = () => {
  const props = {
    uploadImmediately: false,
    showUploadBtn: false,
  };

  const UploadButton = (
    <div className={styles['upload-button']}>
      <img src={UploadImg} alt="" />
      <div className={styles['bottom-text']}>
        <Icon type="add" />
        <span>上传图片</span>
      </div>
    </div>
  );
  return (
    <div className={styles.uploader}>
      <Upload {...props}>{UploadButton}</Upload>
    </div>
  );
};

export default UploadItem;
